<section class="navbar navbar-fixed-top site-navbar">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#collapse"
                    aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">Wones</a>
        </div>
        <div class="collapse navbar-collapse" id="collapse">
            <ul class="nav navbar-nav">
                <li class="home"><a href="/">首页</a></li>
            </ul>
            {% for item in tree %}
                <ul class="nav navbar-nav ">
                <li class="dropdown post">
                    <a href="{{ url_for('frontend.frontend_post_list',title=item.title) }}" class="dropdown-toggle {{ item.title }}" data-toggle="dropdown" role="button" aria-haspopup="true"
                       aria-expanded="false">{{ item.name }} <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        {% for i in item.child %}
                            <li>
                                <a href="{{ url_for('frontend.frontend_post_list',title=i.title) }}">{{ i.name }}</a>
                            </li>
                        {% endfor %}
                        <li role="separator" class="divider"></li>
                        <li><a href="{{ url_for('frontend.frontend_post_list',title=item.title) }}">所有的({{ item.name }})</a></li>
                    </ul>
                </li>
            </ul>
            {% endfor %}

            <ul class="nav navbar-nav navbar-right">
                {#                <li><a href="">登陆</a></li>#}
            </ul>
        </div>
    </div>
</section>